import com.cn.Mapper.goodsMapper.GoodsHotsMapper;
import com.cn.entity.goods.Goods_hots;
import com.cn.util.SqlsesstionUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

/**
 * @ClassName testHots
 * @Description TODO
 * @Author yujiajing
 * @Date 2022/10/17 22:08
 * @Version 1.0
 */
public class testHots {
    @Test
    public void updateHotsByCart(){
        SqlSession sqlSession= SqlsesstionUtil.getSqlSession();
        GoodsHotsMapper goodsHotsMapper =sqlSession.getMapper(GoodsHotsMapper.class);
        goodsHotsMapper.updateGoodsHotByCart();
    }
    @Test
    public void showall(){
        SqlSession sqlSession= SqlsesstionUtil.getSqlSession();
        GoodsHotsMapper goodsHotsMapper =sqlSession.getMapper(GoodsHotsMapper.class);
        List<Goods_hots> hotsList =goodsHotsMapper.showHots();
        System.out.println(hotsList.toString());
    }
}
